import Vue from 'vue'
import Router from 'vue-router'
import hooks from './hooks/' // 路由钩子

import index from '@/view/index'
import bespoke from '@/view/bespoke'
import tankyou from '@/view/thankyou'
import aboutwe from '@/view/aboutwe'
import feedback from '@/view/feedback'
import privacy from '@/view/privacy'
import videoclass from '@/view/videoclass'

Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index,
      meta: {
        title: 'LiveThree官网'
      }
    },
    {
      path: '/bespoke',
      name: 'bespoke',
      component: bespoke,
      meta: {
        title: '预约'
      }
    },
    {
      path: '/tankyou',
      name: 'tankyou',
      component: tankyou,
      meta: {
        title: '预约成功'
      }
    },
    {
      path: '/aboutwe',
      name: 'aboutwe',
      component: aboutwe,
      meta: {
        title: '关于我们'
      }
    },
    {
      path: '/feedback',
      name: 'feedback',
      component: feedback,
      meta: {
        title: '家长反馈'
      }
    },
    {
      path: '/privacy',
      name: 'privacy',
      component: privacy,
      meta: {
        title: '隐私政策'
      }
    },
    {
      path: '/videoclass',
      name: 'videoclass',
      component: videoclass,
      meta: {
        title: '模拟课堂'
      }
    }
  ]
})
hooks(router)

export default router
